{% extends "admin_base.html" %}
{% load humanize %}

{% block container %}
<div class="row">
  <div class="span12">
    <table class="table table-striped table-bordered">
      <thead>
        <tr>
          <th>Name</th>
          <th>Email</th>
          <th>Referrer</th>
          <th>Created</th>
          <th>Create Invite</th>
          <th>Send Invite</th>
        </tr>
      </thead>
      <tbody>
        {% for prospective in prospectives %}
          <tr>
            <td>{{prospective.name}}</td>
            <td>{{prospective.email}}</td>
            <td>{{prospective.referrer}}</td>
            <td>{{prospective.created|naturaltime}}</td>
            <td>
              {% if prospective.invite %}
                {{prospective.invite.code}}
              {% else %}
                <form action="/a/superadmin/prospectives" method="POST" style="margin: 0">
                  {% csrf_token %}
                  <input type="hidden" name="command" value="new_invite">
                  <input type="hidden" name="prosp_id" value="{{prospective.pk}}">
                  <input type="submit" class="btn btn-primary" value="Create">
                </form>
              {% endif %}
            </td>
            <td>
              <form action="/a/superadmin/invites" method="POST" style="margin: 0">
                {% csrf_token %}
                <input type="hidden" name="command" value="delete">
                <input type="hidden" name="invite" value="{{invite.pk}}">
                <input type="button" class="btn btn-primary disabled" value="Send" disabled>
              </form>
            </td>
          </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>
</div>
<div class="row">
  <div class="span2">
    <ul class="nav nav-pills">
      {% for message in messages %}
        
      {% endfor %}
    </ul>
  </div>
  <div class="span10">
    
  </div>
</div>
{% endblock container %}